{include file="public/header" /}



<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <div class="subject">
        <h3>{$Think.lang.ds_member_manage}</h3>
        <h5></h5>
      </div>
      {include file="public/admin_items" /}
    </div>
  </div>

  <form method="get" name="formSearch" id="formSearch">
    <div class="ds-search-form">
      <dl>
        <dd>
          <select name="search_field_name">
            <!-- <option {if $search_field_name == 'member_email'}selected='selected'{/if} value="member_email">{$Think.lang.member_index_email}</option> -->
            <option {if $search_field_name=='member_name' }selected='selected' {/if} value="member_name">用户名称</option>
            <option {if $search_field_name=='member_mobile' }selected='selected' {/if} value="member_mobile">
              {$Think.lang.member_index_mobile}</option>
            <!-- <option {if $search_field_name == 'member_truename'}selected='selected'{/if} value="member_truename">{$Think.lang.member_index_true_name}</option> -->
          </select>
        </dd>
        <dd>
          <input type="text" value="{$search_field_value}" name="search_field_value" class="txt">
        </dd>
        <dd>
          <select name="search_sort">
            <option value="">{$Think.lang.ds_sort}</option>
            <option {if $search_sort=='member_logintime desc' }selected='selected' {/if} value="member_logintime desc">
              {$Think.lang.member_index_last_login}</option>
            <option {if $search_sort=='member_loginnum desc' }selected='selected' {/if} value="member_loginnum desc">
              {$Think.lang.member_index_login_time}</option>
          </select>
        </dd>
      </dl>
      <dl>
        <dt>注册时间</dt>
        <dd>
          <input type="text" class="txt date" name="query_start_time" id="query_start_time"
            value="{$Request.param.query_start_time}">
          &nbsp;–&nbsp;
          <input id="query_end_time" class="txt date" type="text" name="query_end_time"
            value="{$Request.param.query_end_time}">
        </dd>
      </dl>
      <div class="btn_group">
        <input type="submit" class="btn" value="{$Think.lang.ds_search}">
        {if $search_field_value != '' || $search_sort != 'member_id desc' || $query_start_time != ''}
        <a style="margin-left: 84px;margin-top: -51px;" href="{:url('Member/member')}" class="btn btn-default"
          title="{$Think.lang.ds_cancel}">{$Think.lang.ds_cancel}</a>
        {/if}
      </div>
    </div>
  </form>

  <table class="ds-default-table">
    <thead>
      <tr class="thead">
        <th>&nbsp;</th>
        <th>客户编码</th>
        <th>客户名称</th>
        <th colspan="2">{$Think.lang.member_index_name}</th>
        <th>昵称</th>
        <th class="align-center"><span fieldname="logins"
            ds_type="order_by">{$Think.lang.member_index_login_time}</span></th>
        <th class="align-center w100"><span fieldname="last_login"
            ds_type="order_by">{$Think.lang.member_index_last_login}</span></th>
        <th class="align-center w100">{$Think.lang.member_index_points}</th>
        <th class="align-center w100">是否企业认证</th>
        <th class="align-center w100">{$Think.lang.member_index_login}</th>
        <th class="align-center w300">{$Think.lang.ds_handle}</th>
      </tr>
    </thead>
    <tbody>
      {notempty name="member_list"}
      {foreach name="member_list" item="v" key="k" }
      <tr class="hover member">
        <td class="w24"><input type="checkbox" name='del_id[]' value="{$v.member_id}" class="checkitem"></td>
        <td>{$v.member_client}</td>
        <td class="w24">{$v.customer_name}</td>
        <td class="w48 picture">
          <div class="size-44x44">
            <span class="thumb"><i></i>
              {if condition="($v.member_avatar!='')"}
              <img src="{$http_name}/{$v.member_avatar}"" width=" 44" height="44" />
              {else}
              <img src="http://33wang.douyinhot.com/cfe45202004231527382825.png" width="44" height="44" />
              {/if}
            </span>
          </div>
        </td>

        <td>
          <p class="name"><strong>{$v.member_name}</strong>
            <p class="smallfont">{$Think.lang.member_index_reg_time}:&nbsp;{$v.member_addtime}</p>

            <!-- <div class="im"><span class="email">

                {if $v.member_qq != ''}
                <a target="_blank" href="{$Think.HTTP_TYPE}wpa.qq.com/msgrd?v=3&uin={$v.member_qq}&site=qq&menu=yes"
                  class="" title="QQ: {$v.member_qq}"></a>
                {/if}
                {if $v.member_mobile != ''}
                <div style="font-size:13px; padding-left:10px">&nbsp;&nbsp;{$v.member_mobile}</div>
                {/if}
            </div> -->
        </td>
        <td>{$v.member_nickname}</td>
        <td class="align-center">{$v.member_loginnum}</td>
        <td class="w150 align-center">
          <p>{$v.member_logintime}</p>
          <p>{$v.member_login_ip}</p>
        </td>
        <td class="align-center">{$v.member_points}</td>
        <td class="align-center">
          {if condition="($v.enterprise_status=='')"}
          未认证
          {elseif condition="($v.enterprise_status!='')"}
          {$enterprise_status[$v['enterprise_status']]}
          {/if}
        </td>
        <td class="align-center">{if $v.member_state ==
          1}{$Think.lang.member_edit_allow}{else/}{$Think.lang.member_edit_deny}{/if}</td>


        <td class="align-center">

          <!-- 企业认证审核通过 -->
          <a href="javascript:dsLayerOpen('{:url('Member/enterprise_info',['member_id'=>$v.member_id])}','查看-{$v.member_name}','800px','585px')"
            class="dsui-btn-view"><i class="iconfont"></i>查看</a>

          <a href="javascript:dsLayerOpen('{:url('Member/edit',['member_id'=>$v.member_id])}','{$Think.lang.ds_edit}-{$v.member_name}')"
            class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.ds_edit}</a>
          <!-- 通知 -->
          <!-- <a href="javascript:dsLayerOpen('{:url('Notice/notice',['member_name'=>$v.member_name])}','{$Think.lang.member_index_to_message}-{$v.member_name}')" class="dsui-btn-add"><i class="iconfont"></i>{$Think.lang.member_index_to_message}</a> -->
          {if $v.member_state == 0}
          <a href="javascript:dsLayerConfirm('{:url('Member/memberstate',['member_id'=>$v.member_id,'member_state'=>1])}','{$Think.lang.ds_ensure_enable}')"
            class="dsui-btn-add"><i class="iconfont"></i>{$Think.lang.member_edit_allowlogin}</a>
          {else/}
          <a href="javascript:dsLayerConfirm('{:url('Member/memberstate',['member_id'=>$v.member_id,'member_state'=>0])}','{$Think.lang.ds_ensure_disable}')"
            class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.member_edit_denylogin}</a>
          {/if}
          <!-- <a href="javascript:dsLayerOpen('{:url('Predeposit/pd_add',['member_id'=>$v.member_id])}','{$Think.lang.change_predeposit}-{$v.member_name}')" class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.change_predeposit}</a> -->
        </td>
      </tr>
      {/foreach}
      {else /}
      <tr class="no_data">
        <td colspan="11">{$Think.lang.ds_no_record}</td>
      </tr>
      {/notempty}
    </tbody>
    <tfoot class="tfoot">
      {notempty name="member_list"}
      <tr>
        <td class="w24"><input type="checkbox" class="checkall" id="checkallBottom"></td>
        <td colspan="16">
          <label for="checkallBottom">{$Think.lang.ds_select_all}</label>
          &nbsp;&nbsp;<a href="JavaScript:void(0);" class="btn btn-small"
            onclick="submit_delete_batch()"><span>{$Think.lang.member_edit_denylogin}</span></a>
        </td>
      </tr>
      {/notempty}
    </tfoot>
  </table>
  {$show_page}

</div>
<script type="text/javascript">
  $(function () {
    $('#query_start_time').datepicker({
      dateFormat: 'yy-mm-dd'
    });
    $('#query_end_time').datepicker({
      dateFormat: 'yy-mm-dd'
    });
  });

  function submit_delete(ids_str) {
    _uri = ADMINSITEURL + "/Member/memberstate.html?member_id=" + ids_str;
    dsLayerConfirm(_uri, '{$Think.lang.ds_ensure_disable}');
  }
</script>